package com.pzhu.controller.impl;

import com.pzhu.controller.UserController;
import com.pzhu.pojo.User;
import com.pzhu.service.impl.UserServiceImpl;

import java.util.List;

public class UserControllerImpl implements UserController {
    private UserServiceImpl userService = new UserServiceImpl();


    @Override
    public boolean checkUser(long account, String password) {
        System.out.println("controller checkUser 方法");
        System.out.println(account);
        return userService.checkUser(account, password);
    }

    @Override
    public boolean addUser(User user) {
        return userService.addUser(user);
    }

    @Override
    public boolean deleteUser(long id) {
        return false;
    }

    @Override
    public User selectUser(long id) {
        return userService.selectUserById(id);
    }

    @Override
    public boolean updateUser(User user) {
        return false;
    }

    @Override
    public List<User> selectAllUser(User user) {
        return null;
    }

    @Override
    public long selectLoginCount() {
        return userService.selectLoginCount();
    }

    @Override
    public Long selectLastUserId() {
        return userService.selectLastUserId();
    }

    @Override
    public long setLoginCount(long loginCount) {
        return userService.setLoginCount(loginCount);
    }

}
